<template>
	<div>
		<el-table
		    :data="UserByExamList"
		    border
		    style="width: 100%">
		    <el-table-column
		      fixed
		      prop="userName"
		      label="用户名"
		     >
		    </el-table-column>
		    <el-table-column
		      prop="userCard"
		      label="身份证"
		   >
		    </el-table-column>
		    <el-table-column
		      prop="userNum"
		      label="学号"
		      >
		    </el-table-column>
		    <el-table-column
		      fixed="right"
		      label="操作"
		     >
		      <template slot-scope="scope">
		        <el-button @click="ChangeItem(scope.row)" type="text" size="small">查看</el-button>
		      </template>
		    </el-table-column>
		  </el-table>
	</div>
</template>

<script>
	import {
		HttpManager
	} from "../../../../../request/Teacher.js"
	export default {
		data() {
			return {
				activeNames: ['1'],
				UserByExamList:[]
				
			};
		},
		props: {
			examName:{
				type: String
			}
		},
		watch:{
			examName(newvel){
				console.log(newvel);
				this.faceCardResultList();
			}
		},
		methods: {
			handleChange(val) {
				console.log(val);
			},
			getUserByExam()
			{
				var parmas={
					examId:this.examName
				}
				HttpManager.getUserByExam(parmas).then(e=>{
					console.log(e);
					this.UserByExamList=e.data.data;
				})
			},
			ChangeItem(val)
			{
				this.$router.push({path:"/Portrait",query:{id:val.userId,examId:this.examName,name:val.userName}});
			}
			
		},
		created() {
			this.getUserByExam();
		}
	}
</script>

<style scoped="scoped">
	.record>li {
		display: flex;
		justify-content: space-between;
		margin-top: 1.25rem;
	}
</style>
